using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using JXMSTC2.Model;
using JXMSTC2.Control;
using JXMSTC2.Common;
using System.Data.SqlClient;

public partial class UserControl_cEduMaterial : System.Web.UI.UserControl
{
    public int EduMaterialID;
    public string loadUrl;
    protected void Page_Load(object sender, EventArgs e)
    {
        EduMaterialID = Convert.ToInt32(Request.QueryString["EduMaterialId"].ToString().Trim());

        if (!Page.IsPostBack)
        {
            BindGridView(EduMaterialID);
        }
    }

    public void BindGridView(int id)
    {
        EduMaterialModelControl eduMaterialControl = new EduMaterialModelControl();

        EduMaterial eduMaterial = eduMaterialControl.GetModel(id);

        this.lblTitle.Text = eduMaterial.Title.ToString();
        this.lblNum.Text = eduMaterial.DownloadTimes.ToString();
        this.lblSize.Text = eduMaterial.Size.ToString();
        this.lblDescribe.Text = eduMaterial.Describe.ToString();

        loadUrl = eduMaterial.Url.ToString();

    }
}
